package com.zyf.school.manager.dao;

import com.zyf.school.manager.domain.Dict;
import com.zyf.school.manager.domain.DictTree;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Component;

import java.util.List;

@Mapper
@Component("dictTreeDao")
public interface DictTreeDao {


    //通过父类id查询子类信息
    @Select("select id,name as title from dict where parentid = 0 ")
    public List<DictTree> queryParent();

    //通过父类id查询子类信息
    @Select("select id,name as title from dict where parentid = #{id} ")
    public List<DictTree> queryByParentId(@Param("id") int id);
}
